package com.litt.saap.system.po;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import java.io.Serializable;

/**
 * <br>
 * Table:user_group<br>
 * @author Hibernate Tools 3.4.0.CR1
 * @version 1.0
 * @since May 25, 2015 12:33:59 PM
 */
@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
@Table(name = "user_group")
public class UserGroup implements Serializable {
	/**
	 * UID
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 序号.
	 */
	private Integer id;

	/**
	 * 租户ID.
	 */
	private int tenantId;

	/**
	 * 父组织ID.
	 */
	private int parentId;

	/**
	 * 编号.
	 */
	private long code;

	/**
	 * 名称.
	 */
	private String name;

	/**
	 * 类型
	        1：部门
	        2：群组.
	 */
	private int type;

	/**
	 * 描述.
	 */
	private String description;

	/**
	 * 状态.
	 */
	private int status;

	/**
	 * 排序.
	 */
	private int position;

	/**
	 * 创建用户.
	 */
	private int createBy;

	/**
	 * 创建时间.
	 */
	private Date createDatetime;

	/**
	 * 更新用户.
	 */
	private int updateBy;

	/**
	 * 更新时间.
	 */
	private Date updateDatetime;

	public UserGroup() {
	}

	public UserGroup(int tenantId, int parentId, long code, String name,
			int type, int status, int position, int createBy,
			Date createDatetime, int updateBy, Date updateDatetime) {
		this.tenantId = tenantId;
		this.parentId = parentId;
		this.code = code;
		this.name = name;
		this.type = type;
		this.status = status;
		this.position = position;
		this.createBy = createBy;
		this.createDatetime = createDatetime;
		this.updateBy = updateBy;
		this.updateDatetime = updateDatetime;
	}

	public UserGroup(int tenantId, int parentId, long code, String name,
			int type, String description, int status, int position,
			int createBy, Date createDatetime, int updateBy, Date updateDatetime) {
		this.tenantId = tenantId;
		this.parentId = parentId;
		this.code = code;
		this.name = name;
		this.type = type;
		this.description = description;
		this.status = status;
		this.position = position;
		this.createBy = createBy;
		this.createDatetime = createDatetime;
		this.updateBy = updateBy;
		this.updateDatetime = updateDatetime;
	}

	/**  
	 * Get 序号.
	 * @return 序号
	 */
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	/**
	 * Set 序号.
	 * @param id 序号
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**  
	 * Get 租户ID.
	 * @return 租户ID
	 */

	@Column(name = "TENANT_ID", nullable = false)
	public int getTenantId() {
		return this.tenantId;
	}

	/**
	 * Set 租户ID.
	 * @param tenantId 租户ID
	 */
	public void setTenantId(int tenantId) {
		this.tenantId = tenantId;
	}

	/**  
	 * Get 父组织ID.
	 * @return 父组织ID
	 */

	@Column(name = "PARENT_ID", nullable = false)
	public int getParentId() {
		return this.parentId;
	}

	/**
	 * Set 父组织ID.
	 * @param parentId 父组织ID
	 */
	public void setParentId(int parentId) {
		this.parentId = parentId;
	}

	/**  
	 * Get 编号.
	 * @return 编号
	 */

	@Column(name = "CODE", nullable = false)
	public long getCode() {
		return this.code;
	}

	/**
	 * Set 编号.
	 * @param code 编号
	 */
	public void setCode(long code) {
		this.code = code;
	}

	/**  
	 * Get 名称.
	 * @return 名称
	 */

	@Column(name = "NAME", nullable = false, length = 100)
	public String getName() {
		return this.name;
	}

	/**
	 * Set 名称.
	 * @param name 名称
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**  
	 * Get 类型
	        1：部门
	        2：群组.
	 * @return 类型
	        1：部门
	        2：群组
	 */

	@Column(name = "TYPE", nullable = false)
	public int getType() {
		return this.type;
	}

	/**
	 * Set 类型
	        1：部门
	        2：群组.
	 * @param type 类型
	        1：部门
	        2：群组
	 */
	public void setType(int type) {
		this.type = type;
	}

	/**  
	 * Get 描述.
	 * @return 描述
	 */

	@Column(name = "DESCRIPTION", length = 500)
	public String getDescription() {
		return this.description;
	}

	/**
	 * Set 描述.
	 * @param description 描述
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**  
	 * Get 状态.
	 * @return 状态
	 */

	@Column(name = "STATUS", nullable = false)
	public int getStatus() {
		return this.status;
	}

	/**
	 * Set 状态.
	 * @param status 状态
	 */
	public void setStatus(int status) {
		this.status = status;
	}

	/**  
	 * Get 排序.
	 * @return 排序
	 */

	@Column(name = "POSITION", nullable = false)
	public int getPosition() {
		return this.position;
	}

	/**
	 * Set 排序.
	 * @param position 排序
	 */
	public void setPosition(int position) {
		this.position = position;
	}

	/**  
	 * Get 创建用户.
	 * @return 创建用户
	 */

	@Column(name = "CREATE_BY", nullable = false)
	public int getCreateBy() {
		return this.createBy;
	}

	/**
	 * Set 创建用户.
	 * @param createBy 创建用户
	 */
	public void setCreateBy(int createBy) {
		this.createBy = createBy;
	}

	/**  
	 * Get 创建时间.
	 * @return 创建时间
	 */

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATETIME", nullable = false, length = 19)
	public Date getCreateDatetime() {
		return this.createDatetime;
	}

	/**
	 * Set 创建时间.
	 * @param createDatetime 创建时间
	 */
	public void setCreateDatetime(Date createDatetime) {
		this.createDatetime = createDatetime;
	}

	/**  
	 * Get 更新用户.
	 * @return 更新用户
	 */

	@Column(name = "UPDATE_BY", nullable = false)
	public int getUpdateBy() {
		return this.updateBy;
	}

	/**
	 * Set 更新用户.
	 * @param updateBy 更新用户
	 */
	public void setUpdateBy(int updateBy) {
		this.updateBy = updateBy;
	}

	/**  
	 * Get 更新时间.
	 * @return 更新时间
	 */

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATE_DATETIME", nullable = false, length = 19)
	public Date getUpdateDatetime() {
		return this.updateDatetime;
	}

	/**
	 * Set 更新时间.
	 * @param updateDatetime 更新时间
	 */
	public void setUpdateDatetime(Date updateDatetime) {
		this.updateDatetime = updateDatetime;
	}

}
